# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=libparserutils
pkgver=0.2.4
pkgrel=5
pkgdesc='Library for building efficient parsers'
arch=(loong64 x86_64)
url='https://www.netsurf-browser.org/projects/libparserutils/'
license=(MIT)
makedepends=('netsurf-buildsystem')
source=("https://download.netsurf-browser.org/libs/releases/$pkgname-$pkgver-src.tar.gz")
sha256sums=('322bae61b30ccede3e305bf6eae2414920649775bc5ff1d1b688012a3c4947d8')

build() {
  cd $pkgname-$pkgver
  sed 's:_BSD_SOURCE:_DEFAULT_SOURCE:' -i Makefile
  make INCLUDEDIR=include LIBDIR=lib PREFIX=/usr COMPONENT_TYPE=lib-shared
}

package() {
  cd $pkgname-$pkgver
  make install INCLUDEDIR=include LIBDIR=lib PREFIX=/usr DESTDIR="$pkgdir" \
    COMPONENT_TYPE=lib-shared
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# getver: source.netsurf-browser.org/libparserutils.git/plain/Makefile
# vim: ts=2 sw=2 et:
